//program: CDev_CASITA_replication.do
//author: Ann C. Miller, PhD, MPH. Harvard Medical School
//Stata 15.1

********************************************************************************************************
**  These are the commands to replicate the findings of the paper                                     **
**  by Miller, AC, Rumaldo N et al. Success at Scale: Outcomes of Community-Based Neurodevelopment   **
**  Intervention (CASITA) for Children Ages 6–20 months With Risk of Delay in Lima, Peru              **
**  Child Dev. 2021 Jun 11. doi: 10.1111/cdev.13602     PMID 34114651                                **
********************************************************************************************************



**Use on CDEV_2021_CASITA_replication_dataset.dta*

count
preserve
keep if study_a_participant==3
count

***Table 1
 tab Sex Groupo_participant_1 , row col chi2
 bysort Groupo_participant_1: summ months_at_enroll, detail
  ttest months_at_enroll, by(study_arm1)
 bysort Groupo_participant_1: summ peso_nac , detail
 ttest peso_nac , by(study_arm1)
 bysort Groupo_participant_1: summ sem_gest , detail
  ttest sem_gest , by(study_arm1)
 restore
tab region Groupo_participant_1 , row col chi2
  

  
  
 ******Table 2: 
tab study_arm2
sktest total_z_vs_wb2
bysort study_arm2: summ total_z_vs_wb1
ranksum total_z_vs_wb1, by (study_arm2)
bysort study_arm2: summ total_z_vs_wb2
ranksum total_z_vs_wb2, by (study_arm2)
bysort study_arm2: summ comm_z_vwb1
ranksum comm_z_vwb1, by (study_arm2)
bysort study_arm2: summ comm_z_vwb2
ranksum comm_z_vwb2, by (study_arm2)
bysort study_arm2: summ gmotor_z_vwb1
ranksum gmotor_z_vwb1, by (study_arm2)
bysort study_arm2: summ gmotor_z_vwb2
ranksum gmotor_z_vwb2, by (study_arm2)
bysort study_arm2: summ persoc_z_vwb1
ranksum persoc_z_vwb1, by (study_arm2)
bysort study_arm2: summ persoc_z_vwb2
ranksum persoc_z_vwb2, by (study_arm2)
bysort study_arm1: summ HOMEscore
bysort study_arm1: summ HOMEscore_fu

*****Table 3:
regress total_z_vs_wb2 study_arm2 total_z_vs_wb1
regress total_z_vs_wb2 study_arm1 total_z_vs_wb1 Sex gest_age mom_educ
regress comm_z_vwb2 study_arm1 comm_z_vwb1 Sex gest_age mom_educ
regress gmotor_z_vwb2 study_arm1 gmotor_z_vwb1 Sex gest_age mom_educ
regress persoc_z_vwb2 study_arm1 persoc_z_vwb1 Sex gest_age mom_educ

****Table 4:
regress total_z_vs_wb2 study_arm1 total_z_vs_wb1 Sex gest_age mom_educ
esizereg study_arm1

*****Table 5:
ttest CogComp_interv= CogComp_cont, unpaired
ttest LangComp_interv= LangComp_cont, unpaired
ttest MotComp_interv= MotComp_cont, unpaire




   
  
  
  
 
 
 